<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<form action="" method="post">
    <h2>{{ get_flashed_messages()[0] }}</h2>    <!--添加成功-->
    <h2>{{ get_flashed_messages()[1] }}</h2>    <!--登录成功-->
    <h2>{{ get_flashed_messages()[2] }}</h2>    <!--修改成功-->
    <h2>{{ get_flashed_messages()[3] }}</h2>    <!--删除成功-->
<h2 style="color: goldenrod">欢迎登录博客首页~~~</h2>
    <h3>当前登录用户：<span style="color: red">{{username}}</span></h3>
<h1 style="color: aqua;font-size: 30px;text-align: center">博客列表</h1>

<table style="border: 5px solid chartreuse;height: 50px;text-align: center;border-collapse: collapse;margin: auto">
    <tr>
        <th style="border: 5px solid chartreuse;height: 50px;color: aqua;font-size: 25px">ID</th>
        <th style="border: 5px solid chartreuse;height: 50px;color: aqua;font-size: 25px">标题</th>
        <th style="border: 5px solid chartreuse;height: 50px;color: aqua;font-size: 25px">作者</th>
        <th style="border: 5px solid chartreuse;height: 50px;color: aqua;font-size: 25px">内容</th>
        <th style="border: 5px solid chartreuse;height: 50px;color: aqua;font-size: 25px">删除</th>
        <th style="border: 5px solid chartreuse;height: 50px;color: aqua;font-size: 25px">修改</th>
    </tr>

    {% for item in blog_list %}
    <tr>
        <td style="border: 5px solid chartreuse;width: 60px;height: 30px;"><b>{{ item.id }}</b></td>
        <td style="border: 5px solid chartreuse;width: 150px;height: 30px;"><b>{{ item.title}}</b></td>
        <td style="border: 5px solid chartreuse;width: 100px;height: 30px;"><b>{{ item.author }}</b></td>
        <td style="border: 5px solid chartreuse;height: 30px;"><b>{{ item.content }}</b></td>
        <td style="border: 5px solid chartreuse;width: 80px;height: 30px;"><b><a href="/delete/{{ item.id }}">{{ delete }}</a></b></td>
        <td style="border: 5px solid chartreuse;width: 80px;height: 30px;"><b><a href="/update/{{ item.id }}">{{ update }}</a></b></td>
    </tr>
    {% endfor %}

</table>
</form>
</body>
</html>